package com.easyCms.base.entity;

/**
 * @（#）:ResultBean.java
 * @description: 
 * @author: liusq 2017年11月11日
 * @version: Version 1.0
 */

import java.io.Serializable;

public class ResultBean<T> implements Serializable {
	private static final long serialVersionUID = 1L;
	public static final String SUCCESS = "00000";
	public static final String FAIL = "99999";
	public static final int NO_PERMISSION = 2;
	private String msg = "success";
	private String code = SUCCESS;
	private T data;
	private int count;

	public ResultBean() {
		super();
	}

	public ResultBean(T data) {
		super();
		this.data = data;
	}

	public ResultBean(Throwable e) {
		super();
		this.msg = e.toString();
		this.code = FAIL;
	}

	/**
	 * @return the msg
	 */
	public String getMsg() {
		return msg;
	}

	/**
	 * @param msg
	 *            the msg to set
	 */
	public void setMsg(String msg) {
		this.msg = msg;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the data
	 */
	public T getData() {
		return data;
	}

	/**
	 * @param data
	 *            the data to set
	 */
	public void setData(T data) {
		this.data = data;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}
}
